{#**
*
* 功能描述（购物车模板）
*
* @author suoya <jlusuoya@gmail.com>
* @version 1
*#}

{#include file="header.tpl" title="购物车" menuIdx=2 headImg="index" curJs="shopping_flow" #}
{#include file="define.tpl" scope=parent#}
<div class="block box" >
    <div id="ur_here">
        当前位置: <a href=".">首页</a> <code>&gt;</code> 购物流程 </div>
</div>

<div class="blank"></div>
<div class="block" >


    <script type="text/javascript" src="js/showdiv.js"></script>  <script type="text/javascript">
        var user_name_empty = "请输入您的用户名！";
        var email_address_empty = "请输入您的电子邮件地址！";
        var email_address_error = "您输入的电子邮件地址格式不正确！";
        var new_password_empty = "请输入您的新密码！";
        var confirm_password_empty = "请输入您的确认密码！";
        var both_password_error = "您两次输入的密码不一致！";
        var show_div_text = "请点击更新购物车按钮";
        var show_div_exit = "关闭";
    </script>
    <div class="flowBox">
        <div class="flowstep_1"></div>
        <form id="formCart" name="formCart" method="post" action="#">
            <table width="100%" align="center" border="0" cellpadding="5" cellspacing="2" bgcolor="#fff" style="background:#fff;border:2px solid #F1592A;">
                <tr style="background:#F1592A;color:#fff; line-height:30px;">
                    <th width="20%">商品名称</th>
                    <th width="30%">属性</th>
                    <th >价格</th>
                    <th >购买数量</th>
                    <th >小计</th>
                    <th >操作</th>
                </tr>
                {#foreach $cartlist as $k => $item #}
                    <tr id="cart_tr_{#$k#}">
                        <td align="center">
                            <a href="index.php?action=food.detail&id={#$item['id']#}&version={#$item['version']#}" target="_blank" align="center"><img src="data/cake/cake_{#$item['id']#}.jpg" border="0" title="{#$item['name']#}" width="50" /></a><br />
                            <a href="index.php?action=food.detail&id={#$item['id']#}&version={#$item['version']#}" target="_blank" class="f6">{#$item['name']#}</a>
                            {#if $item['status'] != 0 #}
                                <br/><strong style="color:#ff0000">{#$food_notice[$item['status']]#}</strong>
                            {#/if#}
                        </td>
                        {#$cur_price=round($item['price']*$item['discount'], 2)#}
                        <td align="left">重量:{#$item['size']#}.0{#$item['unit']#}:{#$item['describe']#}[{#$cur_price#}] <br />
                            （每磅蛋糕赠送5套叉碟）</td>
                        <td align="center">￥{#$cur_price#}元</td>
                        <td align="center">
                            {#if $item['status'] > 1 #}
                                0
                            {#else#}
                                <input class="TextInput" onchange="changeCnt($(this).val(), '{#$k#}')" id="cart_{#$k#}" value="{#$item['cnt']#}" size="4" >
                            {#/if#}
                        </td>
                        <td align="center"><div id="total_{#$k#}">￥{#round($cur_price * $item['cnt'], 2)#}元</div></td>
                        <td align="center">
                            <a href="javascript:if (confirm('您确实要把该商品移出购物车吗？')) location.href='index.php?action=cart.remove&key={#$k#}'" class="f8">删除</a>
                        </td>
                    </tr>
                {#/foreach#}
            </table>
            <input type="hidden" name="step" value="update_cart" />
        </form>

        <table border="0" bgcolor="#ffffff" width="100%"  style="background-color:#fffeea;line-height:30px;">
            <tbody>
                <tr>
                    <td align="left" ><a href="javascript:;" onclick="javascript:addToCart(1)" class="f8">[添加到购物车]</a></td>
                    <td width="10%" align="left" ><a href="index.php?action=food.detail&id=1"><img width="50" border="0" title="叉碟" src="data/cake/cake_1.jpg" /></a></td>
                    <td width="80%" align="left" >除按蛋糕规格免费赠送的餐具数量外（详见下面说明），是否额外需要餐具？(单价：1元/一叉一碟)</td>
                </tr>
                <tr>
                    <td align="left"><a href="javascript:;" onclick="javascript:addToCart(2)" class="f8">[添加到购物车]</a></td>
                    <td align="left"><a href="index.php?action=food.detail&id=2"><img width="50" border="0" title="生日蜡烛" src="data/cake/cake_2.jpg" /></a></td>
                    <td align="left">生日蛋糕免费赠送一盒，是否需要额外蜡烛？(单价：0元/盒)</td>
                </tr>
                <tr>
                    <td align="left"><a href="javascript:;" onclick="javascript:addToCart(3)" class="f8">[添加到购物车]</a></td>
                    <td align="left"><a href="index.php?action=food.detail&id=3"><img width="50" border="0" title="保温包" src="data/cake/cake_3.jpg"/></a></td>
                    <td align="left">出口品质的保温包，室内保冷约3小时，室外保冷约2小时。<span>只适用1磅、2磅蛋糕</span>(单价：20元/个)</td>
                </tr>		
                <tr>
                    <td align="left"><a href="javascript:;" onclick="javascript:addToCart(4)" class="f8">[添加到购物车]</a></td>
                    <td align="left"><a href="index.php?action=food.detail&id=4"><img width="50" border="0" title="梵地定制蜡烛candle" src="data/cake/cake_4.jpg"/></a></td>
                    <td align="left">梵地特制的蜡烛需要单独订购，是否需要蜡烛？(单价：5元/个)</td>
                </tr>
            </tbody>
        </table>   
        <table width="100%" align="center" border="0" cellpadding="5" cellspacing="0" bgcolor="#dddddd">
            <tr>
                <td bgcolor="#ffffff">
                    <a href="index.php?action=cart.reload" style="font-size:3em; color:#ff8800">点此更新购物车再下单更准确</a>
                </td>
                <td bgcolor="#ffffff" align="right">
                    <input type="button" onclick="gotoUrl('index.php?action=food.index')" class="button_nomarl" value="继续购物" />
                    {#if count($cartlist) != 0#}
                        {#if $bind #}
                            <input type="button" onclick="gotoUrl('{#$web_root['adm']#}index.php?action=order.commit')" class="button_nomarl" value="电话订单" />
                        {#else#}
                            <input type="button" onclick="gotoUrl('index.php?action=order.commit')" class="checklogin button_nomarl" value="开始结算" />
                        {#/if#}
                    {#/if#}
                </td>
            </tr>
        </table>
        <table border="0" width="100%" style="margin-top: 15px; margin-bottom: 50px;">
            <tbody>
                <tr>
                    <td colspan="4"><b style="color:#c4996e">温馨提示:</b></td>
                </tr>
                <tr>
                    <td width="8%" align="left">1.0磅：</td>
                    <td width="9%">约13x13cm</td>
                    <td width="10%">1刀+5碟+5叉 </td>
                    <td width="73%">适合4-5人</td>
                </tr>
                <tr>
                    <td align="left">2.0磅：</td>
                    <td>约17x17cm</td>
                    <td>1刀+10碟+10叉</td>
                    <td>适合7-8人</td>
                </tr>
                <tr>
                    <td align="left">3.0磅：</td>
                    <td>约23x23cm </td>
                    <td>1刀+15碟+15叉</td>
                    <td>适合11-12人</td>
                </tr>
                <tr>
                    <td align="left">5.0磅：</td>
                    <td>约30x30cm</td>
                    <td>1刀+25碟+25叉</td>
                    <td>适合18-20人</td>
                </tr>
                <tr>
                    <td colspan="4">
                        订购5磅以上规格的蛋糕请与客服人员联系，订购电话：<strong style="color:#c4996e">4006–517-217<br>
                            </td>
                            </tr>
                            </tbody>
                            </table>  
                            </div>
                            <div class="blank5"></div>
                            </div>

                            {#include file="footer.tpl"#}
